#include "Server.h"

#include "RakSleep.h"

Server::Server() : m_maxClients(10), m_serverPort(60000), m_quit(false) {
	m_packetHandler = new PacketHandler;
}

Server::~Server() {
	delete m_packetHandler;
}

void Server::execute() {
	m_Peer->Startup(m_maxClients, 30, &SocketDescriptor(m_serverPort,0), 1);
	m_Peer->SetMaximumIncomingConnections(30);
    while(!m_quit) {
    	handleNetwork();
    	RakSleep(10);
    }
}
